import { useState } from "react";
const index = (
  onChange = () => {
    console.log("没有传递change方法");
  }
) => {
  const [position, setPosition] = useState({
    pageSize: 10,
    current: 1,
    total: 200,
    pageSizeOptions: ["10", "20", "50", "100"],
    onChange: (v) =>
      onChange(
        setPosition,
        {
          ...position,
          pageSizeOptions: [...position.pageSizeOptions],
        },
        v
      ),
  });
  return position;
};
export default index;
